// OGoMojo
// Whitemice.MOGI.ZOGI.zOGIProxy
// License: LGPL
// Copyright: Whitemice Consulting, 2006
// Author(s): Adam Tauno Williams (awilliam@whitemice.org)
using System;
using System.Collections;
using CookComputing.XmlRpc;

namespace Whitemice.MOGI.ZOGI
{	
	[XmlRpcUrl("http://192.168.3.170/zidestore/so/adam/")]
	internal interface zOGIProxy
	{	
		[XmlRpcMethod("zogi.getLoginAccount")]
		XmlRpcStruct GetLoginAccount(int detail);
	
		[XmlRpcMethod("zogi.getTypeOfObject")]
		string GetName(string objectId);
	
	  /// Favorite Methods
		[XmlRpcMethod("zogi.getFavoritesByType")]
		Array GetFavoritesByType(string entityName, int detail);
		
		[XmlRpcBegin("zogi.getFavoritesByType")]
    IAsyncResult BeginGetFavoritesByType(string entityName, int detail, AsyncCallback acb, object state);
    
    [XmlRpcEnd]
    object EndGetFavoritesByType(IAsyncResult asr);
		
		[XmlRpcMethod("zogi.flagFavorites")]
		void FlagFavorites(Array favoriteIds);
		
		[XmlRpcMethod("unflagFavorites")]
		void UnflagFavorites(Array favoriteIds);
						
		/// Sync Methods
		[XmlRpcMethod("zogi.getObjectById")]
		XmlRpcStruct GetObject(int objectId, int detail);
		
    [XmlRpcBegin("zogi.getObjectById")]
    IAsyncResult BeginGetObject(int objectId, int detail, AsyncCallback acb, object state);

    [XmlRpcEnd]
    XmlRpcStruct EndGetObject(IAsyncResult asr);		
		
		[XmlRpcMethod("zogi.getObjectsById")]
		Array GetObjects(int[] objectIds, int detail);
		
    [XmlRpcBegin("zogi.getObjectsById")]
    IAsyncResult BeginGetObjects(Array objectIds, int detail, AsyncCallback acb, object state);

    [XmlRpcEnd]
    Array EndGetObjects(IAsyncResult asr);
		
		[XmlRpcMethod("zogi.getObjectVersionsByObjectId")]
		Array GetObjectVersions(Array objectIds);
		
    [XmlRpcBegin("zogi.getObjectVersionsByObjectId")]
    IAsyncResult BeginGetObjectVersions(Array objectIds, AsyncCallback acb, object state);

    [XmlRpcEnd]
    object EndGetObjectVersions(IAsyncResult asr);
    
		[XmlRpcMethod("zogi.getTasksByList")]
		Array GetTasksByList(string list, int detail);
		
    [XmlRpcBegin("zogi.getTasksByList")]
    IAsyncResult BeginGetTasksByList(string list, int detail, AsyncCallback acb, object state);

    [XmlRpcEnd]
    object EndGetTasksByList(IAsyncResult asr);

		[XmlRpcMethod("zogi.putTaskNotation")]
		int PutTaskNotation(string id, string action, string comment);
		
		[XmlRpcMethod("zogi.putObject")]
		int PutObject(XmlRpcStruct obj);		
	}
}
